import { Injectable } from '@angular/core';
import * as gc from 'src/app/global/const';
import { HttpClient } from '@angular/common/http';
import { JsonResult } from '../global/model';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class UserMillService {

  private url = {
    'save':gc.BACKEND_SERVER + '/userMill/save',
  }
  constructor(
    private http:HttpClient
  ) { }

  save(record:UserMill):Observable<JsonResult>{
    return this.http.post<JsonResult>(this.url.save,record);
  }

}

export class UserMill {
  iid:number;
  open_id:string;
  mill_sid:string;
  userid:string;
  username:string;
  mill_default:Boolean;
  effective:Boolean;
  create_time:Date;
}
